#include "opencv2/opencv.hpp"

using  namespace cv;

int main(void)
{
	//
	String fn = "D:\\OpenCV\\opencv\\sources\\samples\\data\\lena.jpg";
	Mat image = imread(fn);
	Mat hsv;
	Mat gray;
	Mat HsvChannels[3];
    
	cvtColor(image, hsv, COLOR_BGR2HSV);

	cvtColor(image, gray, COLOR_BGR2GRAY);

	split(hsv, HsvChannels);

	imshow("Resource", image);
	/*imshow("HSV", hsv);
	imshow("H", HsvChannels[0]);

	imshow("S", HsvChannels[1]);

	imshow("V", HsvChannels[2]);*/
	imshow("Gray", gray);
	waitKey(0);

}